package htlgkr.nodlehs;

public class DBSubjectTbl implements DBSubjectColumns {
	public static final String TABLE_NAME = "subjects";
	public static final String SQL_DROP = "DROP TABLE IF EXISTS subjects";
	public static final String SQL_DEL = "DELETE subjects";
	public static final String[] ALL_COLUMNS = new String[] { sub_ID + " AS _id", sub_long_name, sub_short_name, sub_description};
	public static final String SQL_CREATE = "CREATE TABLE subjects ( " +
			"sub_ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " +
			"sub_long_name TEXT NOT NULL," +
			"sub_short_name TEXT NOT NULL, " +
			"sub_description TEXT)";
	public static final String SQL_INSERT = "INSERT INTO subjects (sub_long_name, sub_short_name, sub_description) VALUES(?,?,?)";
	public static final String SQL_SUBSELTEACHER ="SELECT sub_id, sub_long_name, sub_short_name, sub_description " +
			"FROM subjects " +
			"WHERE sub_id IN (SELECT s_ID FROM subtea WHERE t_ID = ?)";
}
